<template>
	<view class="page">
		<!-- 案件主体信息编辑 -->
		<biz-case-editor :caseObj="current_case"></biz-case-editor>
	</view>
</template>

<script>
import { mapState, mapGetters } from "vuex";

export default {
	data() {
		return {
			title: "Hello",
		};
	},
	computed: {
		...mapState({
			current_case: (state) => state.caseDetail.current_case,
		}),
		...mapGetters("caseDetail", ["isDirty", "current_time"]),
	},
	onLoad: function (option) {
		//option为object类型，会序列化上个页面传递的参数
		console.log(option.itemId); //打印出上个页面传递的参数。

		this.$store.dispatch("caseDetail/fetch_case_by_id", {
			payload: {
				case_id: option.itemId,
			},
		});
	},
	onBack: function (option) {
		console.log("option.itemId");
	},
};
</script>

<style scoped>
.page {
	background-color: #ececec;
}
</style>
